#include <stdio.h>
int change_16(int const i)
{
	int right=0;
	right = i/16*10+(i%16);
	return right;
}
int main()
{
    int wrong=0;
    int right=0;
    scanf("%d", &wrong);
    right=change_16(wrong);
    printf("%d",right);
    return 0;
}